﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;

namespace FinalWork
{
    public partial class FormAdd01 : Form
    {
        private readonly manuServices01 service = new manuServices01();

        

        public FormAdd01()
        {
            InitializeComponent();
        }

       
        private void FormAdd01_Load(object sender, EventArgs e)
        {

        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }
       

        //写入记录
        private void button1_Click(object sender, EventArgs e)
        {
            manuAddCreateModel model = new manuAddCreateModel()
            {
                菜名 = textBox1.Text,
                份数 = textBox2.Text,
                价格 = textBox4.Text,
              
            };
            service.Create(model);
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void textBox4_TextChanged(object sender, EventArgs e)
        {

        }
    }
}
